package cn.kgc.dto;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.*;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import io.swagger.annotations.ApiModel;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;

import com.baomidou.mybatisplus.annotation.Version;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * 品牌(PmsBrand)表实体类
 *
 * @author makejava
 * @since 2022-11-27 13:41:35
 */
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ApiModel
@SuppressWarnings("serial")
public class PmsBrandAddDTO implements Serializable {

    /**
     * @NotNull:不能为空
     * @NotBlank：不能为null
     * @NotEmpty：集合元素上
     * @NotBlank:字符串上
     *
     *
     * @Pattern:正则表达式
     * @Length:字符串长度
     * @Max:最大值
     * @Min:最小值
     */

    @ApiModelProperty(name = "name", value = "品牌名", dataType = "java.lang.String")
    @NotBlank(message = "name:品牌名不能为空")
    @Length(max = 50,message = "name:品牌名字符长度小于50")
    private String name;    //品牌名

    @ApiModelProperty(name = "logo", value = "品牌logo地址", dataType = "java.lang.String")
    private String logo;    //品牌logo地址

    @ApiModelProperty(name = "descript", value = "介绍", dataType = "java.lang.string")
    private String descript;    //介绍

    @ApiModelProperty(name = "firstLetter", value = "检索首字母", dataType = "java.lang.String")
    @Pattern(regexp="[a-zA-Z]{1}",
            message = "firstLetter:检索首字母只能是a-z或者A-Z之间的字母且长度必须为1")
    private String firstLetter;    //检索首字母

    @ApiModelProperty(name = "sort", value = "排序", dataType = "java.lang.Integer")
    @Min(value = 0,message = "排序的最小值是0")
    @Max(value=10,message="排序的最大值是10")
    private Integer sort;    //排序

    //品牌对应的分类的ID
    private List<Long>categoryIds=new ArrayList<>();

}
